package com.gitee.wsl.mathematics.matrix.ext

import com.gitee.wsl.mathematics.matrix.mat2.Matrix2
import com.gitee.wsl.mathematics.matrix.mat2.MutableMatrix2
import com.gitee.wsl.mathematics.matrix.mat3.Matrix3
import com.gitee.wsl.mathematics.matrix.mat3.MutableMatrix3
import com.gitee.wsl.mathematics.matrix.mat4.Matrix4
import com.gitee.wsl.mathematics.matrix.mat4.MutableMatrix4


operator fun<T:Number> MutableMatrix2<T, *, *>.plusAssign(other: Matrix2<T, *, *>) = proxy.updateIndexed { index, t -> t + other.proxy[index] }

operator fun<T:Number> MutableMatrix3<T, *, *>.plusAssign(other: Matrix3<T, *, *>) = proxy.updateIndexed { index, t -> t + other.proxy[index] }

operator fun<T:Number> MutableMatrix4<T, *, *>.plusAssign(other: Matrix4<T, *, *>) = proxy.updateIndexed { index, t -> t + other.proxy[index] }